package com.hui.blog_server.controller;

import com.hui.blog_server.entity.LanguageAtts;
import com.hui.blog_server.entity.ResponseResult;
import com.hui.blog_server.service.impl.LanguageAttsServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 彩色的小灰
 */

@RestController
public class LanguageAttsController {

    @Autowired
    private LanguageAttsServiceImpl languageAttsService;

    @GetMapping("/atts")
    public ResponseResult<List<LanguageAtts>> fields(@RequestParam("language_id") Integer languageId) {
        return ResponseResult.success(languageAttsService.getLanguageAtt(languageId));
    }
}
